package com.monkey.luffer.springboot.demo.basis.thread;

import com.alibaba.ttl.threadpool.TtlExecutors;
import org.springframework.stereotype.Component;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @Author kaibing.deng
 * @Date 2024/6/25 18:56
 * @description
 **/
@Component
public class ExectorServiceUtil {

    private static ExecutorService executorService = Executors.newFixedThreadPool(2);


    public static ExecutorService getExecutorService() {
        return TtlExecutors.getTtlExecutorService(executorService);
    }

}
